{% extends "home.html" %}
{% load pagination_tags %}

{% block title %} Add book note - {{ block.super }} {% endblock %}


{% block ads%}
{% endblock %}

{% block content %}

<div class="row">

<div class="span16">
<ul class="breadcrumb">
  <li><a class="active" href="#">Available book notes of "{{ book.title }}"</a> <span class="divider">/</span></li>
</ul>
</div>

{% autopaginate book_notes 4 %}
{% for booknote in book_notes  %}
	<div class="span4">
   	<div class="alert-message block-message warning">
       	 	<a class="close" href="#">&times;</a>
        	<p><strong><a href="{% url book_upnote note_id=booknote.id dontvalidate='no' %} ">{{ booknote.book.title.upper }}: </a></strong> {{ booknote.snippet }} </p>

      	</div>
	</div>
{% endfor %}



<div class="span14">
  {% paginate %}
</div>

{% ifequal saveok 'yes' %} 

  <div class="span16">
      <div class="alert-message success">

        <a class="close" href="#">&times;</a>
        <p>Your note is add successfully</p>

      </div>
  </div>
{% endifequal %}


<div class="span16">
<div class="well">
<form  method="POST" action ="{% url book_addnote book_id=book.id dontvalidate='no' %}"> 

<fieldset>
   <legend>Add note</legend>
                       
    {% for field in booknoteform %}
       
       {% if field.errors %}  
       <div class="clearfix error">
            {{ field.label_tag }}
            <div class="input">
              {{ field }}
             {% for error in field.errors %} 
             <span class="help-inline">
              {{ error }}</span>
            </div>
             {% endfor %}
        </div> 
       {% else %}          
  
        <div class="clearfix">
          {{ field.label_tag }}
          <div class="input">
           {{ field }}
          </div>
        </div><!-- /clearfix -->
       {% endif %}
    {% endfor %}
 
    <div class="clearfix">
     <div class="input">
       <input  type="submit" class="btn" value=" Add " >
     </div>
    </div>

</fieldset>

</form>
</div>
</div>



</div>
{% endblock %}


